﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using CanDoo.Core.Data;
using CanDoo.Data;
using CanDoo.Admin.Core.Models;

namespace CanDoo.Oil.Core.Models
{
    /// <summary>
    /// 实体类——油桶更换日志
    /// </summary>
    [Serializable]
    [Description("油桶更换日志")]
    public class ChangeOilDrum :  EntityBase,ICreatedTime, IAudited
    {
        /// <summary>
        ///售油机
        /// </summary>
        [Display(Name = "售油机")]
        public virtual OilSalesSerialNum OilSalesSerialNum { get; set; }
        /// <summary>
        ///售油机外键
        /// </summary>
        [Display(Name = "售油机外键")]
        public long OilSalesSerialNumId { get; set; }

        /// <summary>
        ///通道号
        /// </summary>
        [Display(Name = "通道号")]
        [Required]
        public int OilPort { get; set; }

        /// <summary>
        ///油桶序列号
        /// </summary>
        [Display(Name = "油桶序列号")]
        public virtual OilSerialNum OilSerialNum { get; set; }
        /// <summary>
        ///油桶序列号外键
        /// </summary>
        [Display(Name = "售油机外键")]
        public long OilSerialNumId { get; set; }

        /// <summary>
        ///操作时间
        /// </summary>
        [Display(Name = "操作时间")]
        [Required]
        public DateTime? OperateTime { get; set; }

        
        #region Implementation of ICreatedTime

        /// <summary>
        /// 获取设置 信息创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime CreatedTime { get; set; }
        #endregion

        #region Implementation of ICreatedAudited

        /// <summary>
        /// 获取或设置 创建者编号
        /// </summary>
        [Display(Name = "创建人")]
        public string CreatorUserId { get; set; }

        #endregion

        #region Implementation of IUpdateAutited

        /// <summary>
        /// 获取或设置 最后更新时间
        /// </summary>
        [Display(Name = "最后更新时间")]
        public DateTime? LastUpdatedTime { get; set; }

        /// <summary>
        /// 获取或设置 最后更新者编号
        /// </summary>
        [Display(Name = "最后更新用户")]
        public string LastUpdatorUserId { get; set; }

        #endregion
    }
}
